package com.ux.iot.jetlinks.pro;

import com.ux.iot.jetlinks.contant.JetlinksContants;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

import java.util.List;

/**
 * @author caixiaodao
 * @version 1.0
 * 功能描述
 * websocket 配置
 * @date 2021/11/15 10:18
 */
@Data
@ConfigurationProperties(prefix = JetlinksContants.PRO_PREFIX)
public class JetlinksProperties {
    /**
     * jetlinks websocket 开关
     */
    private  boolean enable;

    /**
     * 授权配置
     */
    @NestedConfigurationProperty
    private AuthProperties auth;
    /**
     * websocket 配置
     */
    @NestedConfigurationProperty
    private  WebsocketProperties websocket;
    /**
     * 配置产品订阅
     */
    @NestedConfigurationProperty
    private List<ProductConfig> product;

    /**
     * 自动订阅开关
     */
    private boolean autoSub;
}
